Allow altering only either CPU or memory during VM live scale#8234
Conversation
DaanHoogland
left a comment
There was a problem hiding this comment.
agree with @hsato03 , code lgtm otherwise
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8234 +/- ##
============================================
- Coverage 30.90% 30.74% -0.17%
+ Complexity 34142 33040 -1102
============================================
Files 5353 5352 -1
Lines 375900 374473 -1427
Branches 54629 54610 -19
============================================
- Hits 116158 115114 -1044
+ Misses 244428 244096 -332
+ Partials 15314 15263 -51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7771 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-8336)
|
JoaoJandre
left a comment
There was a problem hiding this comment.
CLGTM, didn't test it
|
@hsato03, are all your concerns met? Just for the sake: @blueorangutan package |
|
@GutoVeronezi a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
hsato03
left a comment
There was a problem hiding this comment.
@hsato03, are all your concerns met?
Just for the sake: @blueorangutan package
Yes, didn't test but CLGTM.
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7859 |
|
@borisstoyanov are you doing tests on this? |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
b9759d0 to
1de263a
Compare
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7981 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-8525)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
Co-authored-by: sato03 <henriquesato2003@gmail.com>
1de263a to
d05f25f
Compare
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8552 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-9123)
|
|
@GaOrtiga this had already passed but needs new attention since the log upgrade |
Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8629 |
|
@blueorangutan test |
|
@rohityadavcloud a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-9186)
|
|
Merging based on approvals, packaging and test results. |
|
As this is merged into main, I am setting the milestone to 20 |
|
@DaanHoogland @GutoVeronezi |
|
|
||
| updateInstanceDetails(cmdDetails, vm, newServiceOfferingId); | ||
|
|
||
| boolean result = upgradeVirtualMachine(vmId, newServiceOfferingId, cmdDetails); |
There was a problem hiding this comment.
Sorry for late review.
@GaOrtiga
if the upgrade fail, should the details be restored to the original values ?
ping @DaanHoogland @GutoVeronezi , anyone has tested it ?
There was a problem hiding this comment.
ping @DaanHoogland @GutoVeronezi , anyone has tested it ?
Yes, it was tested.
if the upgrade fail, should the details be restored to the original values ?
The PR does not address changes to this behavior. it remains the same; we can discuss it in an issue or another PR.
There was a problem hiding this comment.
ping @DaanHoogland @GutoVeronezi , anyone has tested it ?
Yes, it was tested.
Ok, I asked it because I did not see a comment mentioning it has been manually tested ok. If not, it would be good to be manually tested.
Why has tested it, except the author?
if the upgrade fail, should the details be restored to the original values ?
The PR does not address changes to this behavior. it remains the same; we can discuss it in an issue or another PR.
Do you think it is a regression of this PR we should address?
There was a problem hiding this comment.
Why has tested it, except the author?
I don't think I understood your question.
Do you think it is a regression of this PR we should address?
The PR does not address changes to method upgradeVirtualMachine; therefore, the topic you are questioning would not be a regression of this PR.
There was a problem hiding this comment.
Why has tested it, except the author?
I don't think I understood your question.
Sorry typo.
Who has tested it, except the author?
Do you think it is a regression of this PR we should address?
The PR does not address changes to method
upgradeVirtualMachine; therefore, the topic you are questioning would not be a regression of this PR.
please ignore my question regarding the vm details, They are not saved in database before upgrade, so no need to restore.
There was a problem hiding this comment.
Who has tested it, except the author?
I tested it; I do not know if anybody else has tested it too.
please ignore my question regarding the vm details, They are not saved in database before upgrade, so no need to restore.
Yes. The only thing this PR does is facilitate calling the API. For instance, without this PR, if one has a VM with 1 vCPU and 1 GB RAM and wants to scale it to 2 GB RAM, one has to call the API with both the current vCPU count and the new RAM size. With this PR, one will only have to pass the new RAM size in the parameters; ACS will retrieve the current VM's vCPU count and will add it to the details map to be updated; thus, passing the current vCPU count and the new RAM size will have the same behavior as just passing the new RAM size. It just updates the details map (if necessary) before scaling the VM. This applies to RAM, frequency and vCPU.
I created PR #8673 to improve the methods names and docs.
…#8234) * allow change only one parameter during live scale * Update server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Co-authored-by: sato03 <henriquesato2003@gmail.com> * apply change method name * Update server/src/main/java/com/cloud/vm/UserVmManagerImpl.java Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com> --------- Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br> Co-authored-by: sato03 <henriquesato2003@gmail.com> Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
Description
The API
scaleVirtualMachinerequires the specification of both vCPU quantity and memory amount, resulting in an error if either was omitted. This means that if an operator wants to increase the quantity of vCPUs while maintaining the existing memory, they were obligate to provide the current memory value as well.An alteration has been introduced to the API to allow operators to input only the parameters they intend to modify while retaining the current values for the rest.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
I applied the changes in a local lab and verified that if I used the API while inputting only one of the parameters, the scale was successful, and the others kept the current value.